package io.renren.modules.avanotes.service.impl;

import io.renren.config.BizConfig;
import io.renren.modules.avanotes.service.EbbinghausReviewStrategy;
import org.springframework.stereotype.Service;

/**
 * @author: xiaomi
 * @date: 2022/2/27
 * @description:
 * 不了解
 */
@Service(BizConfig.IMPL_STRANGE_EB)
public class StrangeEbbinghausReviewImpl implements EbbinghausReviewStrategy {

    private int[] arr = new int[]{0, 1, 2, 4, 7, 15};

    /**
     * 生成复习数组
     *
     * @return
     */
    @Override
    public int[] getReviewArr() {
        return arr;
    }


    /**
     * 根据 计划日期安排计划：
     * 1. 当天 today；
     * 2. today + 1;
     * 3. today + 1 +2;
     * 4. today + 1 +2+4;
     * 5. today + 1 +2+4+7;
     * 6. today + 1 +2+4+7+15;
     *
     * @param studyId
     * @param ssId
     * @param studyDate
     * @param userId
     */
//    @Override
//    public List<ReviewScheduleEntity> genReviewSchedules(Long studyId, Long ssId, Integer studyDate, Long userId) {
//        List<ReviewScheduleEntity> list = new ArrayList<>();
//        int year = studyDate / 10000;
//        LocalDate localDate = BizUtils.genLocalDateByIntDate(studyDate, year);
//        int[] arr = new int[]{0, 1, 2, 4, 7, 15};
//        int internal = 0;
//        int len = arr.length;
//        for (int i = 0; i < len; i++) {
//            internal += arr[i];
//            //添加6次
//            String tempDate = localDate.plusDays(internal).toString().replaceAll("-", "");
//            list.add(new ReviewScheduleEntity(studyId, ssId, userId, Integer.parseInt(tempDate)));
//        }
//        return list;
//    }


}
